import http from '../../utils/request/request'

//创建仓库
export function createWarehouse(data) {
    return http({
        url: `/breed/supply/warehouse`,
        method: 'post',
        data
    })
}
//修改仓库信息
export function editWarehouse(data) {
    return http({
        url: `/breed/supply/warehouse`,
        method: 'put',
        data
    })
}
//设置仓库管理员
export function setWarehouseManager(data) {
    return http({
        url: `/breed/supply/warehouse/manager`,
        method: 'put',
        data
    })
}
//查询所有仓库
export function getAllWarehouseInfo(id) {
    return http({
        url: `/breed/supply/warehouse/all/${id}`,
        method: 'get'
    })
}

//分页查询仓库信息
export function getWarehouseInfo(id = 1, current = 1, size = 5) {
    return http({
        url: `/breed/supply/warehouse/${id}/${current}/${size}`,
        method: 'get'
    })
}
//查询仓库详细信息
export function getDetailInfo(id) {
    return http({
        url: `/breed/supply/warehouse/one/${id}`,
        method: 'get'
    })
}
//批量删除
export function deleteBatch(ids) {
    return http({
        url: `/breed/supply/warehouse`,
        method: 'delete',
        data: ids
    })
}
//删除单个
export function deleteOne(id) {
    return http({
        url: `/breed/supply/warehouse/${id}`,
        method: 'delete',
    })
}